﻿Imports System.Data.SqlClient

Namespace StatementSources
    Public Class BaseStatementSource
        Implements IStatementSource

        Private _command As SqlCommand

        Public Sub New()
            _command = New SqlCommand()
        End Sub

        Public Property Command As SqlCommand Implements IStatementSource.Command
            Get
                Return _command
            End Get
            Set(value As SqlCommand)
                _command = value
            End Set
        End Property

        Public ReadOnly Property Parameters As SqlParameterCollection Implements IStatementSource.Parameters
            Get
                Return _command.Parameters
            End Get
        End Property

        Public Property Sql As String Implements IStatementSource.Sql
            Get
                Return _command.CommandText
            End Get
            Set(value As String)
                _command.CommandText = value
            End Set
        End Property
    End Class
End Namespace

